<?xml version="1.0" encoding="utf-8"?>

<!--
SPDX-FileCopyrightText: Adam Evyčędo

SPDX-License-Identifier: GPL-3.0-or-later
-->

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	tools:context="xyz.apiote.bimba.czwek.settings.feeds.FeedChooserActivity">

	<com.google.android.material.appbar.AppBarLayout
		android:id="@+id/app_bar_layout"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:fitsSystemWindows="true"
		app:liftOnScroll="true">

		<com.google.android.material.appbar.MaterialToolbar
			android:id="@+id/topAppBar"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:minHeight="?attr/actionBarSize"
			app:menu="@menu/feeds_menu"
			app:title="@string/title_cities" />

		<com.google.android.material.textfield.TextInputEditText
			android:id="@+id/filter_input"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_marginStart="15dp"
			android:layout_marginEnd="15dp"
			android:hint="@string/filter_feeds"
			android:visibility="gone"
			tools:visibility="visible" />

	</com.google.android.material.appbar.AppBarLayout>

	<androidx.recyclerview.widget.RecyclerView
		android:id="@+id/results_recycler"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:layout_marginStart="8dp"
		android:layout_marginEnd="8dp"
		android:clipToPadding="false"
		android:paddingTop="8dp"
		android:paddingBottom="8dp"
		android:visibility="gone"
		app:layout_behavior="@string/appbar_scrolling_view_behavior"
		tools:visibility="visible" />

	<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
		android:id="@+id/button_save"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_gravity="bottom|end"
		android:layout_margin="16dp"
		android:text="@string/save"
		android:visibility="gone"
		app:icon="@drawable/save"
		app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
		tools:visibility="visible" />


	<androidx.constraintlayout.widget.ConstraintLayout
		android:id="@+id/feeds_overlay"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		tools:visibility="gone">

		<com.google.android.material.progressindicator.CircularProgressIndicator
			android:id="@+id/progress"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:indeterminate="true"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent" />

		<ImageView
			android:id="@+id/error_image"
			android:layout_width="92dp"
			android:layout_height="92dp"
			android:visibility="gone"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			tools:ignore="ContentDescription"
			tools:src="@drawable/error_net" />

		<com.google.android.material.textview.MaterialTextView
			android:id="@+id/error_text"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_marginStart="16dp"
			android:layout_marginTop="8dp"
			android:layout_marginEnd="16dp"
			android:textAlignment="center"
			android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
			android:visibility="gone"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/error_image"
			tools:text="No connection" />

		<com.google.android.material.button.MaterialButton
			android:id="@+id/more_button"
			style="@style/Widget.Material3.Button.TextButton"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginTop="16dp"
			android:text="@string/more_info"
			android:visibility="gone"
			app:layout_constraintEnd_toEndOf="@+id/error_text"
			app:layout_constraintTop_toBottomOf="@+id/error_text" />
	</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>